From 5cc358249d11ee3dbff9ec5546ad24847fa78fdc Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 30 Sep 2003 04:51:37 +0000 Subject: [PATCH] Terminate allocated string. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@508 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 0bd965b81..5219a6606 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -171,6 +171,7 @@ xstrndupt(const char *str, size_t sz) newstr = xmalloc(newlen + 1); memcpy(newstr, str, newlen); + newstr[newlen+1] = '\0'; rtrim(newstr); return newstr; -- 2.30.2